package com.smart.gui;

import java.awt.Font;

import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import javax.swing.border.EmptyBorder;

import com.jgoodies.forms.factories.FormFactory;
import com.jgoodies.forms.layout.ColumnSpec;
import com.jgoodies.forms.layout.FormLayout;
import com.jgoodies.forms.layout.RowSpec;
import com.smart.core.AppManager.DesiredEnum;

public class Legacy_and_Target_Test_Environment_Part1 extends JFrame {

	/**
	 * 
	 */
	private static final long serialVersionUID = -680026569867999835L;

	private JPanel contentPane;

	/**
	 * singleton pattern -- getInstance
	 */
	private static Legacy_and_Target_Test_Environment_Part1 uniqueInstanceForm;

	public static synchronized Legacy_and_Target_Test_Environment_Part1 getInstance() {
		if (uniqueInstanceForm == null) {
			try {
				uniqueInstanceForm = new Legacy_and_Target_Test_Environment_Part1();
			} catch (Exception e) {
				e.printStackTrace();
			}
		}
		return uniqueInstanceForm;
	}

	/**
	 * Create the frame.
	 */
	public Legacy_and_Target_Test_Environment_Part1() {
		ButtonHandler handler = new ButtonHandler(this);

		setTitle("Legacy and Target Test Environment Questionnaire -- Part 1");
		setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);
		setBounds(25, 25, 641, 537);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		contentPane.setLayout(new FormLayout(new ColumnSpec[] {
				FormFactory.RELATED_GAP_COLSPEC, FormFactory.MIN_COLSPEC,
				FormFactory.RELATED_GAP_COLSPEC,
				ColumnSpec.decode("default:grow"),
				FormFactory.RELATED_GAP_COLSPEC, FormFactory.MIN_COLSPEC, },
				new RowSpec[] { FormFactory.RELATED_GAP_ROWSPEC,
						FormFactory.MIN_ROWSPEC,
						FormFactory.RELATED_GAP_ROWSPEC,
						FormFactory.MIN_ROWSPEC,
						FormFactory.RELATED_GAP_ROWSPEC,
						RowSpec.decode("default:grow"),
						FormFactory.RELATED_GAP_ROWSPEC,
						FormFactory.MIN_ROWSPEC,
						FormFactory.RELATED_GAP_ROWSPEC,
						RowSpec.decode("default:grow"),
						FormFactory.RELATED_GAP_ROWSPEC,
						FormFactory.MIN_ROWSPEC,
						FormFactory.RELATED_GAP_ROWSPEC,
						RowSpec.decode("default:grow"),
						FormFactory.RELATED_GAP_ROWSPEC,
						FormFactory.MIN_ROWSPEC,
						FormFactory.RELATED_GAP_ROWSPEC,
						RowSpec.decode("default:grow"),
						FormFactory.RELATED_GAP_ROWSPEC,
						FormFactory.MIN_ROWSPEC,
						FormFactory.RELATED_GAP_ROWSPEC,
						RowSpec.decode("default:grow"),
						FormFactory.RELATED_GAP_ROWSPEC,
						FormFactory.MIN_ROWSPEC,
						FormFactory.RELATED_GAP_ROWSPEC,
						RowSpec.decode("default:grow"),
						FormFactory.RELATED_GAP_ROWSPEC,
						FormFactory.DEFAULT_ROWSPEC,
						FormFactory.RELATED_GAP_ROWSPEC,
						FormFactory.DEFAULT_ROWSPEC, }));

		JLabel lblHighLevelUnderstanding = new JLabel(
				"High Level Understanding of the Legacy Test Environment");
		contentPane.add(lblHighLevelUnderstanding, "4, 2");

		JLabel lblDesirable = new JLabel("Desirable?");
		contentPane.add(lblDesirable, "6, 2");

		JLabel lblNewLabel = new JLabel("1)");
		contentPane.add(lblNewLabel, "2, 4");

		JLabel lblWhatIsThe = new JLabel(
				"What is the main functionality provided by the legacy test environment?");
		contentPane.add(lblWhatIsThe, "4, 4, left, default");

		JComboBox<DesiredEnum> comboBox = new JComboBox<DesiredEnum>(
				DesiredEnum.values());
		comboBox.setName("comboBox");
		comboBox.setMaximumRowCount(DesiredEnum.values().length);
		comboBox.setEditable(false);
		comboBox.setSelectedItem(DesiredEnum.UNK);
		contentPane.add(comboBox, "6, 4, fill, default");

		JScrollPane scrollPane = new JScrollPane();
		contentPane.add(scrollPane, "4, 6, 3, 1, fill, fill");

		JTextArea textArea = new JTextArea();
		textArea.setName("textArea");
		textArea.setFont(new Font("Monospaced", Font.PLAIN, 11));
		textArea.setRows(1);
		textArea.setWrapStyleWord(true);
		textArea.setLineWrap(true);
		scrollPane.setViewportView(textArea);

		JLabel label = new JLabel("2)");
		contentPane.add(label, "2, 8");

		JLabel lblWhatIsThe_1 = new JLabel(
				"What is the history of the legacy test environment?");
		contentPane.add(lblWhatIsThe_1, "4, 8, left, default");

		JComboBox<DesiredEnum> comboBox_1 = new JComboBox<DesiredEnum>(
				DesiredEnum.values());
		comboBox_1.setName("comboBox_1");
		comboBox_1.setMaximumRowCount(DesiredEnum.values().length);
		comboBox_1.setEditable(false);
		comboBox_1.setSelectedItem(DesiredEnum.UNK);
		contentPane.add(comboBox_1, "6, 8, fill, default");

		JScrollPane scrollPane_1 = new JScrollPane();
		contentPane.add(scrollPane_1, "4, 10, 3, 1, fill, fill");

		JTextArea textArea_1 = new JTextArea();
		textArea_1.setName("textArea_1");
		textArea_1.setFont(new Font("Monospaced", Font.PLAIN, 11));
		textArea_1.setRows(1);
		textArea_1.setWrapStyleWord(true);
		textArea_1.setLineWrap(true);
		scrollPane_1.setViewportView(textArea_1);

		JLabel label_1 = new JLabel("3)");
		contentPane.add(label_1, "2, 12");

		JLabel lblWhatIsThe_2 = new JLabel(
				"What is the high-level architecture of the system?");
		contentPane.add(lblWhatIsThe_2, "4, 12, left, default");

		JComboBox<DesiredEnum> comboBox_2 = new JComboBox<DesiredEnum>(
				DesiredEnum.values());
		comboBox_2.setName("comboBox_2");
		comboBox_2.setMaximumRowCount(DesiredEnum.values().length);
		comboBox_2.setEditable(false);
		comboBox_2.setSelectedItem(DesiredEnum.UNK);
		contentPane.add(comboBox_2, "6, 12, fill, default");

		JScrollPane scrollPane_2 = new JScrollPane();
		contentPane.add(scrollPane_2, "4, 14, 3, 1, fill, fill");

		JTextArea textArea_2 = new JTextArea();
		textArea_2.setName("textArea_2");
		textArea_2.setFont(new Font("Monospaced", Font.PLAIN, 11));
		textArea_2.setRows(1);
		textArea_2.setWrapStyleWord(true);
		textArea_2.setLineWrap(true);
		scrollPane_2.setViewportView(textArea_2);

		JLabel label_2 = new JLabel("4)");
		contentPane.add(label_2, "2, 16");

		JLabel lblWhatPortionofThe = new JLabel(
				"What portion of the system is envisioned for migration?");
		contentPane.add(lblWhatPortionofThe, "4, 16, left, default");

		JComboBox<DesiredEnum> comboBox_3 = new JComboBox<DesiredEnum>(
				DesiredEnum.values());
		comboBox_3.setName("comboBox_3");
		comboBox_3.setMaximumRowCount(DesiredEnum.values().length);
		comboBox_3.setEditable(false);
		comboBox_3.setSelectedItem(DesiredEnum.UNK);
		contentPane.add(comboBox_3, "6, 16, fill, default");

		JScrollPane scrollPane_3 = new JScrollPane();
		contentPane.add(scrollPane_3, "4, 18, 3, 1, fill, fill");

		JTextArea textArea_3 = new JTextArea();
		textArea_3.setName("textArea_3");
		textArea_3.setFont(new Font("Monospaced", Font.PLAIN, 11));
		textArea_3.setRows(1);
		textArea_3.setWrapStyleWord(true);
		textArea_3.setLineWrap(true);
		scrollPane_3.setViewportView(textArea_3);

		JLabel lblNewLabel_1 = new JLabel("5)");
		contentPane.add(lblNewLabel_1, "2, 20");

		JLabel lblWhatIsThe_3 = new JLabel(
				"What is the current user interface to the system?");
		contentPane.add(lblWhatIsThe_3, "4, 20, left, default");

		JComboBox<DesiredEnum> comboBox_4 = new JComboBox<DesiredEnum>(
				DesiredEnum.values());
		comboBox_4.setName("comboBox_4");
		comboBox_4.setMaximumRowCount(DesiredEnum.values().length);
		comboBox_4.setEditable(false);
		comboBox_4.setSelectedItem(DesiredEnum.UNK);
		contentPane.add(comboBox_4, "6, 20, fill, default");

		JScrollPane scrollPane_4 = new JScrollPane();
		contentPane.add(scrollPane_4, "4, 22, 3, 1, fill, fill");

		JTextArea textArea_4 = new JTextArea();
		textArea_4.setName("textArea_4");
		textArea_4.setFont(new Font("Monospaced", Font.PLAIN, 11));
		textArea_4.setRows(1);
		textArea_4.setWrapStyleWord(true);
		textArea_4.setLineWrap(true);
		scrollPane_4.setViewportView(textArea_4);

		JLabel label_3 = new JLabel("6)");
		contentPane.add(label_3, "2, 24");

		JLabel lblHowComplexIs = new JLabel(
				"How complex is the user interface?");
		contentPane.add(lblHowComplexIs, "4, 24, left, default");

		JComboBox<DesiredEnum> comboBox_5 = new JComboBox<DesiredEnum>(
				DesiredEnum.values());
		comboBox_5.setName("comboBox_5");
		comboBox_5.setMaximumRowCount(DesiredEnum.values().length);
		comboBox_5.setEditable(false);
		comboBox_5.setSelectedItem(DesiredEnum.UNK);
		contentPane.add(comboBox_5, "6, 24, fill, default");

		JScrollPane scrollPane_5 = new JScrollPane();
		contentPane.add(scrollPane_5, "4, 26, 3, 1, fill, fill");

		JTextArea textArea_5 = new JTextArea();
		textArea_5.setName("textArea_5");
		textArea_5.setFont(new Font("Monospaced", Font.PLAIN, 11));
		textArea_5.setRows(1);
		textArea_5.setWrapStyleWord(true);
		textArea_5.setLineWrap(true);
		scrollPane_5.setViewportView(textArea_5);

		JButton btnSave = new JButton("Save");
		btnSave.setActionCommand(ButtonHandler.SAVE);
		btnSave.addActionListener(handler);
		contentPane.add(btnSave, "1, 28, 6, 1");
	}

}
